package org.dragonnova.iot.business.cloud.transport.adapter;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.handler.codec.haproxy.HAProxyCommand;
import io.netty.handler.codec.haproxy.HAProxyMessage;
import io.netty.handler.codec.haproxy.HAProxyProtocolVersion;

public class HAProxyMessageDecoderAdapter extends ChannelInboundHandlerAdapter {

	@Override
	public void channelRead(ChannelHandlerContext ctx, Object msg)
			throws Exception {
		if (msg instanceof HAProxyMessage) {
			HAProxyMessage message = (HAProxyMessage) msg;
			HAProxyCommand cmd = message.command();
			cmd.byteValue();
			HAProxyProtocolVersion version = message.protocolVersion();
		}
	}
}
